#ifndef __BALLADE_SSL_SOCKET_H__
#define __BALLADE_SSL_SOCKET_H__

#pragma once 

#include <openssl/ssl.h>

#include <ballade/network/socket.h>
#include <ballade/network/ssl_context.h>
#include <ballade/network/ssl_input_stream.h>
#include <ballade/network/ssl_output_stream.h>

namespace Ballade
{
	namespace Network
	{
		
		class NETWORK_API SSLSocket : public Socket
		{
		public:
			SSLSocket(SSLContext& context);
			SSLSocket(const char *ipaddr, const unsigned short port, SSLContext& context);
			~SSLSocket();
			
			virtual void connect(const char *ipaddr, const unsigned short port) throw (SocketError);
			virtual void connect() throw (SocketError);
			virtual void close();
			
		private:
			SSLContext& _context;
			SSL* _ssl;
		};

	}
}

#endif

